package cn.itsource.hbc.user.controller;

import cn.itsource.hbc.user.service.IWxUserService;
import cn.itsource.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/wechat")
public class WxUserController {

    @Autowired
    private IWxUserService wxUserService;


    @PostMapping("/login")
    public AjaxResult login (@RequestBody Map<String,String> map){

      return wxUserService.login(map);
    }


    @PostMapping("/bind")
    public AjaxResult bind (@RequestBody Map<String,String> map){
        System.out.println(map);
        return wxUserService.bind(map);
    }

}
